export default {
    getEvents () {
        return {
            'edge:mouseenter': 'onMouseenter',
            'edge:mouseleave': 'onMouseleave'
        }
    },

    onMouseenter (event) {
        const { graph } = this
        const { item } = event

        if (item.hasState('selected')) {
            return
        }

        graph.setItemState(item, 'hover', true)
        graph.paint()
    },

    onMouseleave ({ item }) {
        const { graph } = this

        if (item.hasState('selected')) {
            return
        }

        graph.setItemState(item, 'hover', false)
        graph.paint()
    }
}
